C (24/254)

From:Martin McKenzie
Date:01 Apr 00 at 22:45:04
Subject:Re: Buffered displays

Hello Bart,

On 31-Mar-00, Bart King wrote:
> Has anyone got any source code (in C) or can explain to me how to
> achieve triple-buffering under graphics cards? I have triple-buffering
> working perfectly under AGA.

RTG software should patch the V39 OS routines for multi-buffering; For
Cybergraphics, I think only V4 works correctly with multi-buffering.

If your code crashes at the cleanup phase, then this might be due to a
problem noticed on some systems:
Here is a brief quote from Sam Jordan on the Warp3D list -
"The screenbuffers allocated using AllocScreenBuffer didn't have the
same order like when the application started resp. the buffers were
allocated. So if the first screenbuffer (the one derived from the
screen by specifying SB_SCREEN_BITMAP) was visible at cleanup time
then everything went ok, otherwise crashes occurred.
I fixed the problem by always making sure, that the initial screenbuffer
is visible when freeing the screenbuffers."

I assume that your graphics card has enough RAM to hold triple buffers at
your chosen resolution & colour depth, along with your WB screen :-)

StormMesa uses multi-buffering (the source should be at the H&P ftp site),
so perhaps you could check out its source code and see if it can shed any
light on your question.

Sorry I cannt be much more help with this topic. I am guessing that nothing
special has to be done to make tri-buffering work on a gfx card - as long
as your code uses the OS functions (ChangeScreenBuffer etc), then the RTG
software should step in and do the business.



Cheerio,
Martin McKenzie
Imagine support: http://www.cadtech.demon.co.uk/

------------------------------------------------------------------------
PERFORM CPR ON YOUR APR!
Get a NextCard Visa, in 30 seconds! Get rates as low as
0.0% Intro or 9.9% Fixed APR and no hidden fees.
Apply NOW!
http://click.egroups.com/1/2121/1/_/451227/_/954622199/
------------------------------------------------------------------------